package es.agroservicio.Agroservicio.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import es.agroservicio.Agroservicio.domain.Bill;
import es.agroservicio.Agroservicio.repository.BillsDAO;

@Component
public class BillsManagerImpl implements BillsManager {

	private static final long serialVersionUID = 1L;

	@Autowired
	private BillsDAO billsDao;

	public void setBillDao(BillsDAO billsDao) {
		this.billsDao = billsDao;
	}

	public List<Bill> getBills() {

		return billsDao.findAllOrderedByName();
	}


}